package com.example.aslongastoday.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * id是用来唯一标识一条回忆记录的项
 * time记录的是这条回忆的具体日期
 * name是这条回忆的回忆名
 * isAnniversary用于标识当前的回忆是不是一个值得纪念的日子
 * iconPath用来保存回忆相关的图标的路径
 * message用来保存和当前回忆相关的注释
 */

public class Memory implements Serializable {
    private Integer id;
    private Date time;
    private String name;
    private boolean isAnniversary;
    private Integer iconID;
    private String message;

    public Memory(Integer id, Date time, String name, boolean isAnniversary, Integer iconID, String message) {
        this.id = id;
        this.time = time;
        this.name = name;
        this.isAnniversary = isAnniversary;
        this.iconID = iconID;
        this.message = message;
    }

    public Memory(Date time, String name, boolean isAnniversary, Integer iconID, String message) {
        this.time = time;
        this.name = name;
        this.isAnniversary = isAnniversary;
        this.iconID = iconID;
        this.message = message;
    }

    public Memory(Integer id, Date time, String name, Integer iconID) {
        this.id = id;
        this.time = time;
        this.name = name;
        this.iconID = iconID;
        // 默认不设为纪念日，且相关的备注信息为无
        this.isAnniversary = false;
        this.message = "";
    }

    public Memory(Date time, String name, Integer iconID) {
        this.time = time;
        this.name = name;
        this.iconID = iconID;
        // 默认不设为纪念日，且相关的备注信息为无
        this.isAnniversary = false;
        this.message = "";
    }

    public Memory() {
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isAnniversary() {
        return isAnniversary;
    }

    public void setAnniversary(boolean anniversary) {
        isAnniversary = anniversary;
    }

    public Integer getIconID() {
        return iconID;
    }

    public void setIconID(Integer iconID) {
        this.iconID = iconID;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Memory{" +
                "id=" + id +
                ", time=" + time +
                ", name='" + name + '\'' +
                ", isAnniversary=" + isAnniversary +
                ", iconID=" + iconID +
                ", message='" + message + '\'' +
                '}';
    }
}
